import request from '@/utils/request'

// 查询货运单列表
export function listFreightorder(data) {
  return request({
    url: `/harvest/freightorder/list`,
    method: 'get',
    params: data
  })
}

// 查询货运单详细
export function getFreightorder(autoid) {
  return request({
    url: '/harvest/freightorder/' + autoid,
    method: 'get'
  })
}

// 新增货运单
export function addFreightorder(data) {
  return request({
    url: '/harvest/freightorder',
    method: 'post',
    data: data
  })
}

// 修改货运单
export function updateFreightorder(data) {
  return request({
    url: '/harvest/freightorder',
    method: 'put',
    data: data
  })
}

// 删除货运单
export function delFreightorder(autoid) {
  return request({
    url: '/harvest/freightorder/' + autoid,
    method: 'delete'
  })
}

// 导出货运单
export function exportFreightorder(data) {
  return request({
    url: '/harvest/freightorder/export',
    method: 'post',
    data: data
  })
}

// 导出货运单入库单
export function exportWhinformExport(data) {
  return request({
    url: '/harvest/freightorder/exportWhinformExport/' + data,
    method: 'get',
    data: data
  })
}
